In multiprocessor computer systems, software lockout is the issue of performance degradation due to the idle wait times spent by the in kernel-level . Software lockout is a major cause of scalability degradation in a multiprocessor system, posing a limit on the maximum useful number of processors. To mitigate the phenomenon, the kernel must be designed to have its as short as possible, therefore decomposing each data structure in smaller substructures.
A conflict happens when more than one CPU tries to access the same resource (a memory location) at the same time. To prevent and inconsistency, only one CPU at a given time is allowed to access a particular data structure, while other CPUs trying to access it at the same time are locked out and wait in idle status.
Three cases can be distinguished, in which idle waiting is either necessary, acceptable, or undesirable. Idle waiting is necessary when access is to a ready list for a low-level scheduling operation. It is acceptable in the case of a critical section for synchronization or IPC operations, which take less time than a context switch (which would itself be required to execute another process in place of idle waiting). Idle waiting is undesirable in the case of a kernel critical section for device management, a situation that arises mainly in monolithic kernels. A microkernel design only encounters the first two cases.
In a multiprocessor system, most conflicts are kernel-level conflicts due to access to kernel-level critical sections, and the resulting idle wait periods have a major impact on performance. The cumulative idle wait time increases the average number of idle processors and reduces scalability and relative efficiency.
Typical values for L/E range from 0.01 to 0.1. In a system with an L/E ratio of 0.05, for instance, with 15 CPUs, one CPU on average will always be idle; with 21 CPUs, 2.8 will be idle on average; with 40 CPUs, 19 will be idle; with 41 CPUs, 20 will be idle. Adding more than 40 CPUs to that system therefore yields little benefit. In general, for each L/E value, there is a threshold for the maximum number of useful CPUs.
Many uniprocessor systems with hierarchical protection domains have been estimated to spend up to 50% of their time performing supervisor mode operations. If such systems were adapted for multiprocessing by setting a single lock around any access to supervisor state, L/E would easily exceed 1, resulting in throughput similar to the uniprocessor system regardless of the number of CPUs added.
Modern operating system kernels mitigate software lockout using techniques such as fine-grained locking, lock-free data structures, read-copy-update (RCU) synchronization, and per-CPU data structures, which together allow contemporary kernels to scale to large numbers of processors.
|
|